﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BlogPlat.Model;
using BlogPlat.Model.Abstract;

namespace BlogPlat.Tests.Helpers
{
    public class Mock
    {
        public static List<Category> CreateDummyCategoryData()
        {
            List<Category> categories = new List<Category>();
            Category c1 = new Category { CategoryID = 34, CategoryName = "ASP.NET", FriendlyUrl = "aspnet" };            
            Category c2 = new Category { CategoryID = 35, CategoryName = "C#", FriendlyUrl = "csharp" };
            Category c3 = new Category { CategoryID = 36, CategoryName = "ASP.NET MVC", FriendlyUrl = "aspnet-mvc" };
            Category c4 = new Category { CategoryID = 37, CategoryName = "DotNetNuke", FriendlyUrl = "dotnetnuke" };

            categories.Add(c1);
            categories.Add(c2);
            categories.Add(c3);
            categories.Add(c4);

            return categories;
        }

        public static List<Post> CreateDummyBlogPostData()
        {
            List<Post> posts = new List<Post>();
            Post p1 = new Post { ID = 3, FriendlyUrl = "test-1", DatePublished = new DateTime(2010, 6, 2), Author = "admin", CategoryID = 2, EnableComments = true, IsDraft = false, PostContent = "test-content", PostSummary = "test-summary", PostTitle = "test title", ViewCount = 9 };
            Post p2 = new Post { ID = 8, FriendlyUrl = "test-2", DatePublished = new DateTime(2009, 9, 6), Author = "admin", CategoryID = 2, EnableComments = false, IsDraft = true, PostContent = "test-content", PostSummary = "test-summary", PostTitle = "test title", ViewCount = 9 };
            Post p3 = new Post { ID = 7, FriendlyUrl = "test-3", DatePublished = new DateTime(2009, 4, 7), Author = "admin", CategoryID = 2, EnableComments = true, IsDraft = false, PostContent = "test-content", PostSummary = "test-summary", PostTitle = "test title", ViewCount = 9 };
            Post p4 = new Post { ID = 4, FriendlyUrl = "test-4", DatePublished = new DateTime(2010, 4, 7), Author = "admin", CategoryID = 2, EnableComments = true, IsDraft = false, PostContent = "test-content", PostSummary = "test-summary", PostTitle = "test title", ViewCount = 9 };

            posts.Add(p1);
            posts.Add(p2);
            posts.Add(p3);
            posts.Add(p4);

            return posts;
        }

        public static List<Tag> CreateDummyTagData()
        {
            List<Tag> tags = new List<Tag>();
            Tag tag1 = new Tag { TagID = 3, TagName = "Tag Name", FriendlyUrl = "tag-name" };
            Tag tag2 = new Tag { TagID = 4, TagName = "Tag Name 1", FriendlyUrl = "tag-name-1" };
            Tag tag3 = new Tag { TagID = 5, TagName = "Tag Name 2", FriendlyUrl = "tag-name-2" };
            Tag tag4 = new Tag { TagID = 6, TagName = "Tag Name 3", FriendlyUrl = "tag-name-3" };
            Tag tag5 = new Tag { TagID = 7, TagName = "Tag Name 4", FriendlyUrl = "tag-name-4" };

            tags.Add(tag1);
            tags.Add(tag2);
            tags.Add(tag3);
            tags.Add(tag4);
            tags.Add(tag5);

            return tags;
        }
    }
}
